< previous page page_381 next page >

Page 381
Simple Object-based Design
To find classes in a project, you first need to analyze what you need that application to accomplish. If youre creating a business application, such as an employee time-tracking system, you can identify the following items in the real world:
Employees
Employee types
Timesheets
Youll also find that the following actions need to be performed:
Employees are input to the system.
An employees information is printed.
Employees are assigned a type.
Employee types are input to the system.
Timesheet information is input to the system.
In this example, youve identified the objectsEmployees, EmployeeTypes, and TimeSheetsand youve identified some actions (methods)Employees.Input, Employees.Print, EmployeeTypes.Input, and EmployeeTypes.Print. Now you simply need to identify all the attributes (data or properties) for each object. For the Employees object, you have the following properties:
First Name
Last Name
Employee ID
Address
City
State
ZIP Code
Salary

 
< previous page page_381 next page >

If you like this book, buy it!